package com.eckey.lab.feign;

import com.eckey.lab.entity.Accoun;
import feign.hystrix.FallbackFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: Marinc
 * @CreateTime: 2023-09-12  16:10
 * @Description: TODO
 * @Version: 1.0
 */
public class AccountFallbackFactory implements FallbackFactory<AccountFeign> {
    public AccountFeign create(Throwable throwable) {
        return new AccountFeign() {
            @PostMapping("/account/add")
            public String add(@RequestBody Accoun accoun) {
                return "添加账单失败";
            }
        };
    }

}
